* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html{
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 100%;
}

body{
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #2c3e50);
  color: #fff;
  height: 100%;
  margin: 0px;
}

.main{
  display: grid;
  grid-template-rows: auto calc(100% - 190px);
  gap: 20px;
  height: calc(100% - 0px);
  margin: 0 auto;
  padding: 20px;
}

header{
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

header h1{
  font-size: 2.8rem;
  margin: 0px;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip:text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

header .subtitle{
  font-size: 1.2rem;
  color: #a0d2eb;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.content{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  /* overflow: auto; */
}

.controls{  
  flex: 1;
  background: rgba(30, 30, 50, 0.7);
  border-radius: 15px;
  max-width: 360px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
}
.legend {
  background: rgba(20, 20, 40, 0.8);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #4facfe;
  border-bottom: 2px solid #4facfe;
  padding-bottom: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.legend-color {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin-right: 15px;
}
.control-group {
  background: rgba(20, 20, 40, 0.8);
  padding: 20px;
  border-radius: 10px;
}
.btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  margin: 10px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #2980b9, #3498db);
}

.btn:active {
  transform: translateY(1px);
}
.instructions {
  background: rgba(20, 20, 40, 0.8);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}
.instructions ul {
  padding-left: 25px;
  margin-top: 15px;
}
.instructions li {
  margin-bottom: 10px;
  line-height: 1.5;
}
.topology-container {
  flex: 3;
  background: rgba(30, 30, 50, 0.7);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: auto;
}
.node {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: move;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    user-select: none;
}

.svg-line{
  width: 100%;
  height:100%;
  position: absolute; 
  top: 0; 
  left: 0;
}